package com.briup.pts.domain.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.PastOrPresent;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 动物信息表
 * @TableName manager_animal
 */
@Data
@Schema(description="动物信息表")
public class Animal implements Serializable {
    @Schema(description="动物编号")
    @JsonProperty("aAnimalId")
    private String aAnimalId;

    @NotBlank(message = "必须提供动物体重信息")
    @Schema(description="动物体重")
    @JsonProperty("aWeight")
    private String aWeight;

    @Schema(description="动物性别,雌性，雄性")
    @JsonProperty("aGender")
    private String aGender;

    @NotBlank(message = "必须提供动物健康状态")
    @Schema(description="健康状态,健康,生病")
    @JsonProperty("aHealthy")
    private String aHealthy;

    @NotBlank(message = "必须提供动物养殖过程状态")
    @Schema(description="过程状态,养殖中，已检疫，已出栏，已屠宰，已入库，已销售")
    @JsonProperty("aStatus")
    private String aStatus;

    @NotBlank(message = "必须提供动物疫苗接种状态")
    @Schema(description="疫苗接种状态：未接种,已接种")
    @JsonProperty("aInoculate")
    private String aInoculate;

    @Schema(description="录入时间")
    @PastOrPresent(message = "动物的录入时间不能晚于当前时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonProperty("aTime")
    private LocalDateTime aTime;

    @NotBlank(message = "必须指定动物所属批次")
    @Schema(description="批次外键")
    @JsonProperty("aBatchId")
    private String aBatchId;

    @NotBlank(message = "必须指定动物所属栏圈")
    @Schema(description="栏圈外键")
    @JsonProperty("aHurdlesId")
    private String aHurdlesId;
}
